import java.lang.reflect.Array;
import java.util.Arrays;
import java.util.Scanner;

public class Main {

	public static void main(String[] args)
	{
		Scanner sc=new Scanner(System.in);
		while(sc.hasNext())
		{
			int n=sc.nextInt();
			StringBuilder[][] str=new StringBuilder[n][];
			for(int i=0;i<n;i++)
			{
				str[i]=new StringBuilder[i+1];
				for(int j=0;j<i+1;j++)
				{
					str[i][j]=new StringBuilder("");
					str[i][j].append(i+1).append('*').append(j+1).append('=').append((i+1)*(j+1));
				}
			}
			
			for(int i=0;i<n;i++)
			{
				for(int j=0;j<i+1;j++)
				{
					if(j<i&&(i+1)*(j+1)<10)System.out.printf("%s  ",str[i][j]);
					else if(j<i&&(i+1)*(j+1)>=10)System.out.printf("%s ",str[i][j]);
					else System.out.printf("%s\n",str[j][j]);
				}
			}
			System.out.println(Arrays.deepToString(str));
		}
	}
}



